package com.lytoyo.neihanduanzi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lytoyo.neihanduanzi.model.blog.BlogCollect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * Package:com.lytoyo.neihanduanzi.mapper
 *
 * @ClassName:BLogCollectMapper
 * @Create:2025/3/16 12:40
 **/
@Mapper
public interface BLogCollectMapper extends BaseMapper<BlogCollect> {
    /**
     * 查询过去是否收藏过的记录
     * @param blogId
     * @param userId
     * @return
     */
    BlogCollect selectPastRecord(@Param("blogId") Long blogId,@Param("userId") Long userId);

    /**
     * 将过去被逻辑删除的收藏记录恢复
     * @param id
     */
    void updatePastRecord(@Param("id") Long id);
}
